package com.github.pig.nideshop.service.impl;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.plugins.pagination.PageHelper;
import com.github.pig.nideshop.entity.NideshopComment;
import com.github.pig.nideshop.mapper.NideshopCommentMapper;
import com.github.pig.nideshop.model.vo.CommentVo;
import com.github.pig.nideshop.service.INideshopCommentService;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import lombok.Data;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author J神
 * @since 2018-06-11
 */
@Service
public class NideshopCommentServiceImpl extends ServiceImpl<NideshopCommentMapper, NideshopComment> implements INideshopCommentService {
    @Autowired
    private NideshopCommentMapper nideshopCommentMapper;
    @Override
    public Page<CommentVo> selectVoPage(Page page, NideshopComment nideshopComment) {
        PageHelper.startPage(page.getCurrent(),page.getSize());
        page.setRecords(nideshopCommentMapper.selectVoPage(page,nideshopComment));
        return page;
    }
}
